package com.pug.service.hotel;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.pug.bo.HotelTypeBo;
import com.pug.mapper.hotel.HotelTypeMapper;
import com.pug.pojo.HotelType;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 飞哥
 * @Title: 学相伴出品
 * @Description: 飞哥B站地址：https://space.bilibili.com/490711252
 * 记得关注和三连哦！
 * @Description: 我们有一个学习网站：https://www.kuangstudy.com
 * @date 2022/3/19$ 16:58$
 */
@Service
@Slf4j
public class HotelTypeServiceImpl extends ServiceImpl<HotelTypeMapper, HotelType> implements IHotelTypeService {
    @Override
    public List<HotelTypeBo> findByHotelId(Long hotelId) {
        QueryWrapper<HotelType> wrapper = new QueryWrapper<>();
        wrapper.eq("hotel_id",hotelId);
        List<HotelType> list = this.list(wrapper);
        return  tranferListBo(list, HotelTypeBo.class);
    }
}
